package com.example.ecommercemanagesystem.util;

import com.example.ecommercemanagesystem.interceptor.FileuploadInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class FileInterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        FileuploadInterceptor fileuploadInterceptor=new FileuploadInterceptor();

        String [] path={"/updateGoods","/addGoods"};
        registry.addInterceptor(fileuploadInterceptor).addPathPatterns(path);
    }
}
